package com.epin.business.system.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.epin.business.system.entity.Resource;
import com.epin.business.system.entity.bo.ResourceNormal;

/**
 * <p>
 * Mapper接口
 * </p>
 *
 * @author xj
 * @since 2016-12-20
 */
public interface ResourceMapper extends BaseMapper<Resource> {
	
	/**
	 * <p>根据条件查找资源列表</p>
	 * 
	 * @param page 分页辅助器
	 * @param params 参数表
	 * <p>
	 * 	参数表可填参数：
	 * 		<p>keyword 关键字</p>
	 * </p>
	 * 
	 * @return List<>
	 * 
	 */
    public List<ResourceNormal> selectResourceList(Pagination page, Map<String, Object> params);
	
    
	/**
	 * <p>根据角色ID获取拥有的资源</p>
	 * 
	 * @param userId 用户ID
	 * 
	 * @return List<>
	 * 
	 */
	public List<ResourceNormal> selectResourceListByUserId(@Param(value = "userId")int userId);
	
	
	/**
	 * <p>根据角色ID获取目录的资源</p>
	 * 
	 * @param userId 用户ID
	 *
	 *@return List<>
	 *
	 */
	public List<ResourceNormal> selectMenuResourceListByUserId(@Param(value = "userId")int userId);
	
    
    
}